package com.igd.common.client;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import com.ibatis.common.util.PaginatedList;
import com.ibatis.sqlmap.client.SqlMapExecutor;
import com.ibatis.sqlmap.client.event.RowHandler;
import com.ibatis.sqlmap.engine.execution.BatchException;

 /**
 * @version  1.0
 *
 * @author   QIAOYU
 *
 * @date     2013-7-31
 *
 * @description	扩展ibatis SqlMapExecutor,让SqlMapExecutor在执行批处理时与业务代码隔离开
 */

@SuppressWarnings("deprecation")
public class IbatisSqlExecutor implements SqlMapExecutor{

	private SqlMapExecutor executor;
	
	public IbatisSqlExecutor(SqlMapExecutor executor){
		
		this.executor = executor;

	}
	
	public Object insert(String id, Object parameterObject) throws SQLException {
		
		return this.executor.insert(id, parameterObject);
	}

	public Object insert(String id) throws SQLException {
		
		return this.executor.insert(id);
	}

	public int update(String id, Object parameterObject) throws SQLException {
		
		return this.executor.update(id, parameterObject);
	}

	public int update(String id) throws SQLException {
		
		return this.executor.update(id);
	}

	public int delete(String id, Object parameterObject) throws SQLException {
		
		return this.executor.delete(id, parameterObject);
	}

	public int delete(String id) throws SQLException {
		
		return this.executor.delete(id);
	}

	public Object queryForObject(String id, Object parameterObject) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public Object queryForObject(String id) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public Object queryForObject(String id, Object parameterObject,
			Object resultObject) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public List queryForList(String id, Object parameterObject)
			throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public List queryForList(String id) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public List queryForList(String id, Object parameterObject, int skip,
			int max) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public List queryForList(String id, int skip, int max) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public void queryWithRowHandler(String id, Object parameterObject,
			RowHandler rowHandler) throws SQLException {
		// TODO Auto-generated method stub
		
	}

	public void queryWithRowHandler(String id, RowHandler rowHandler)
			throws SQLException {
		// TODO Auto-generated method stub
		
	}

	public PaginatedList queryForPaginatedList(String id,
			Object parameterObject, int pageSize) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public PaginatedList queryForPaginatedList(String id, int pageSize)
			throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public Map queryForMap(String id, Object parameterObject, String keyProp)
			throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public Map queryForMap(String id, Object parameterObject, String keyProp,
			String valueProp) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public void startBatch() throws SQLException {
		
		this.executor.startBatch();
	}

	public int executeBatch() throws SQLException {
		
		return this.executor.executeBatch();
	}

	public List executeBatchDetailed() throws SQLException, BatchException {
		// TODO Auto-generated method stub
		return null;
	}
}
